From a8e4d14fc26ea9812ed1c8b79c71616555d95888 Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Sat, 12 May 2018 10:54:02 -0600 Subject: [PATCH] add config tests in GPSBabel.pro. specifically, we look for stdarg.h and unistd.h for zlib. --- .gitignore | 3 +++ GPSBabel.pro | 12 +++++++++++- config.tests/stdarg/.gitignore | 2 ++ config.tests/stdarg/main.cpp | 2 ++ config.tests/stdarg/stdarg.pro | 1 + config.tests/unistd/.gitignore | 2 ++ config.tests/unistd/main.cpp | 2 ++ config.tests/unistd/unistd.pro | 1 + 8 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 config.tests/stdarg/.gitignore create mode 100644 config.tests/stdarg/main.cpp create mode 100644 config.tests/stdarg/stdarg.pro create mode 100644 config.tests/unistd/.gitignore create mode 100644 config.tests/unistd/main.cpp create mode 100644 config.tests/unistd/unistd.pro diff --git a/.gitignore b/.gitignore index 3c95133af..108b097a1 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,9 @@ /gpsbabel.html /gpsbabel.pdf /Makefile +/.qmake.cache +/.qmake.stash +/GPSBabel *.o /GPSBabel[0-9]*.[0-9]*.[0-9]*/ /GPSBabel[0-9]*.[0-9]*.[0-9]*.tar.bz2 diff --git a/GPSBabel.pro b/GPSBabel.pro index 2642a6c95..96154c1c2 100644 --- a/GPSBabel.pro +++ b/GPSBabel.pro @@ -134,8 +134,18 @@ HEADERS = \ INCLUDEPATH += zlib +load(configure) + macx|linux { - DEFINES += HAVE_NANOSLEEP HAVE_LIBUSB HAVE_GLOB HAVE_UNISTD_H + qtCompileTest(unistd) { + # this is used by zlib + DEFINES += HAVE_UNISTD_H + } + qtCompileTest(stdarg) { + # this is used by zlib + DEFINES += HAVE_STDARG_H + } + DEFINES += HAVE_NANOSLEEP HAVE_LIBUSB HAVE_GLOB SOURCES += gbser_posix.cc JEEPS += jeeps/gpslibusb.cc INCLUDEPATH += jeeps diff --git a/config.tests/stdarg/.gitignore b/config.tests/stdarg/.gitignore new file mode 100644 index 000000000..d2b528937 --- /dev/null +++ b/config.tests/stdarg/.gitignore @@ -0,0 +1,2 @@ +/Makefile +/stdarg diff --git a/config.tests/stdarg/main.cpp b/config.tests/stdarg/main.cpp new file mode 100644 index 000000000..dc1abf7ce --- /dev/null +++ b/config.tests/stdarg/main.cpp @@ -0,0 +1,2 @@ +#include +int main() { return 0; } diff --git a/config.tests/stdarg/stdarg.pro b/config.tests/stdarg/stdarg.pro new file mode 100644 index 000000000..bba41b9c1 --- /dev/null +++ b/config.tests/stdarg/stdarg.pro @@ -0,0 +1 @@ +SOURCES = main.cpp diff --git a/config.tests/unistd/.gitignore b/config.tests/unistd/.gitignore new file mode 100644 index 000000000..ff434c851 --- /dev/null +++ b/config.tests/unistd/.gitignore @@ -0,0 +1,2 @@ +/Makefile +/unistd diff --git a/config.tests/unistd/main.cpp b/config.tests/unistd/main.cpp new file mode 100644 index 000000000..3d1e130ca --- /dev/null +++ b/config.tests/unistd/main.cpp @@ -0,0 +1,2 @@ +#include +int main() { return 0; } diff --git a/config.tests/unistd/unistd.pro b/config.tests/unistd/unistd.pro new file mode 100644 index 000000000..bba41b9c1 --- /dev/null +++ b/config.tests/unistd/unistd.pro @@ -0,0 +1 @@ +SOURCES = main.cpp -- 2.30.2